home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 November
/
EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso
/
earcd
/
util
/
misc
/
pf2.lha
/
patchfor020.doc
< prev
Wrap
Text File
|
1995-09-12
|
20KB
|
449 lines
______________________________________________________________________________
/
/
\ /\/ /\/
/
\ _________ ____ ____ ____ ____ /\ /
.---\_ __ /| ¡ | ¡ |----. /
|:::| / | | | | |::::| \ /
|:::| ___|__ | __| | |__.:| \/
|:::| | | | |:|
|:::| ¡ | ¡ |----. .--':|
/|:::| | | | | |::::|
/ `---^--------^----^----' `----^----'
\ / \ /
\/ / »»»»»-[ pRoUDLY pReSeNTS ]-«««««« /\ /
/ \ / \ /
/\ / \/ \ /
/ \/ \ /
/ "PatchFor020" \/
/ A tool which patches MC68000 specific routines in Executables files to
their MC68020 equivelents to improve performance on 020`CPU`s and above!
An EX4-Production for `95!
** NB: Requirements: OS2+, MC68020+ & "reqtools.library" **
______________________________________________________________________________
Introduction
-----------------------------------------------------
This program was written specifically to get some speed gains on MC68020+`s
processors running software which has been compiled for the bog standard
MC68000 processor. Most software has not been specifically compiled for
faster processors and hence the potential for speed improvements are great.
On the 68000 processor there existed only multiplication & division routines
for 16-bit numbers, on 68020`s and above divide & multiply instructions have
been given extended precision. The 68020 can perform 32x32->32, 32x32->64
multiplication and 32/32 and 64/32 division. These are significantly faster
than the multi-precision operations which are required on the 68000. This was
because in order to carry out any 32 Bit multiply or divides on the 68000
compilers where required to link in about three pages full of assembly code.
This method not only wastes considerable amount of processor cycles, but
completly fails to take advantage of 68020, it can do the same calculation
in ONE instruction (excluding the RTS!) !
The program is based around ideas in a program called 'PatchMath020'.. that
program tried to do similar things as this program.. infact it does indeed
support 'Manx C' maths routines a few 'Lattice' function (but not all of
them!) ... My version supports 16 different strains and versions from
the latest popular Amiga compilers including Lattice SAS/C, DICE, Manx,
Maxon, etc, etc, etc.
My program is like a replacement for his program, his could only patch a very
limited amount of programs since it knew so few. The only patch my one does
not do that his does is his special case 'Turbo Silver' patch. At the moment
don`t expect great gains from patching ray tracers since most maths functions
are sprawled all over the code instead of calling the compiler mul/div
functions. In the future I may consider doing special case patches for some
particular programs to give them some *real* speed injections to their maths
functions. Some possible ones I`m thinking about are real maths intensive
programs like ray tracers such as "LightWave" and "Imagine"... This all
depends on if there is enough support for the idea, I know I could get these
slow "c" coded dinosaurs to got around 30 or 40% faster if I really tried...
What with code like 'divu #2,Dn' and so on... Anyone want to convice me its
worth the work??
Anyway, this was a quick few hours jobby, it does the trick, works fine but
isn`t as well coded as it could have been (a bit unstructured!) I originally
thoughed there was only about 6 different strains, it turns out that there
are way in excess of 16+... anyway I hope you like it and enjoy using your
patched programs faster!!!
All The best from 2-Cool/EX4!
How it works..
--------------------------
For people who are sceptical that this program is a fake or a virus or
something then please read below to remove your fears... Infact take a
look at the source-code or even re-assemble it.. (THE FULL SOURCE-CODE
IS SUPPLIED IN THE ARCHIVE! - SEE I`VE GOT NOTHING TO HIDE!)
This program scans a program looking for the standard MC68000 compiler
produced maths functions and then replaces them with the faster MC68020
equivelent code hence speeding up all maths functions in the program
which used these routines.
Most programs written and compiled using the popular C language compiler
development systems use these standard 'maths' routines for dividing and
multiplying functions. This is even the case if the Program has been
specifically compiled for MC68020... (Will compiler writers ever learn?)
Many programs that use 32-bit maths intensively will run significantly
faster after being pached by this program. Some programs after patching
run 2 or even 3 times FASTER than the originals! On the average most
programs will benefit from about 15 to 20% speed gains, which is better
than nothing! It will depend entirely on how many calculations a program
does using the patched routines..
The Patch List..
-------------------------
As this program is a generic patcher, currently not supporting any
specific optimisation patches it will patch MANY MANY programs. Infact at
a rough guess I would say about 2 thirds of all your software, be them,
applications, utilities, tools, devices, libraries, datatypes, handlers,
even games!
Here`s a quick list of some popular programs which when patched are
sped up!
-----------------------------------------------------------------------------
Workbench - tested on many WB3.0 files, including
- most "sys:prefs/#?" files, "sys:libs/#?"
- "sys:l", "sys:devs", datatypes, etc.!
Lattice SAS/C Compiler - All amiga-shared libraries, lib:sc.lib,
- and all executables even including the
- compiler itself and all its libraries!
DICE C Compiler - most executables even including the
- compiler itself and all its utilities
- and linker libraries!
Installer (Commodore) - main program
MUI - main library
ProCalc - main program
LightWave3D - main program & also 'LightRave'
Maxon Cinema-4D - main program (also tested on demo versions)
Devpac - main text editor
Twist - main program
MainActor - main program
AmiBack - main program & tools suite
Deluxe-Paint - main program
Personal-Paint - main program
Photogenics - main library, 'pgs.library'
Directory-Opus - main program
Final-Writer - main program and most 'fwlibs' libraries
Studio - main program, CMSEdit, Printer Prefs, etc.
GP-Fax - main program and view fax program
DMS (DiskMasher) - both shell and gui versions
Digita Organiser - main program
CygnusEd Professional - main program
PowerPacker - main program
PowerData - main program
Snap - main program
ARTM - main program
ACalc - main program
Arq - main program
FJPeg - main program
SuperView - main program
QuickGrab - main program
DiskExpander - some parts including DevicePacker, etc.
GameSmith - Actual link-lib, CITAS, etc, even GS Games!
GadToolsBox - main program
LhA-Windows - main program
LhA - main program
LZX - all versions including 020 & 040
Ami-Express - main program & ACP Server
S-Express - main program & ACP Server
PGP (Pretty Good Privacy) - main program
NComm - main program
Term - main program
FTerm - main program
ToolMaker - main program
SnoopDOS - main program
EasyCatalog - main program
CatComp - main program
CatEdit - main program
XModule - main program
ShowSTD - main program
PlusEd - main program
KingCON - handler file usually located in l: dir
Printer-Manager - main program
many many libraries, devices, datatypes, handlers, etc. ,etc. including
popular ones like 'libs:xprzmodem.library' , 'libs:bullet.library',
'libs:datatypes.library', 'libs:amigaguide.library', etc. etc.
----
This list is absolutely NO MEANS complete in any way, try it with all your
programs, it will NOT damage or even touch programs which do not contain any
of the complier C functions..
This program doesn`t just stop at utilities/tools and so on, TRY it on
games too, here`s just a few we`ve tried;
1. PGATour Golf
2. Gunship 2000
3. A-Train
4. Silent-Service II
5. Monkey-Island II
6. Sim-Life
etc., etc. Infact these days many Software Houses have dropped using Assembly
language (sob..) so you`ll find many many games that can be patched too.. A
shame since they are just wasting the Amiga`s true potential... This program
was written fully in assembly language ... hooray...): ..
------------------------------------------------------------------------------
PLEASE NOTE THAT BEFORE PATCHING *ANY* PROGRAMS, "MAKE A BACKUP COPY!"
OR SAVE THE PATCHED VERSION UNDER A DIFFERENT FILENAME!
This is very important since some programs have checksum protection
in to stop people modifying or trying to crack the registrations and
if patched will just crash due to the code failing the checksums..
ALSO NOTE THAT THE NEW PATCHED PROGRAMS WILL
*** CRASH OR ENTIRELY LOCKUP THE SYSTEM ***
ON ANYTHING LOWER THAN AN MC68020.. HENCE DON`T
TRY THEM ON STANDARD A500`S OR OTHER AMIGA`S WITH MC68000`s
-------------------------------------------------------------------------------
Using the Program
---------------------------------
In order to use this program to its maximum you`ll need an executable file
unpacker.. This is especially true for games you may wish to patch since many
come supplied in compressed format (to save diskspace). I recommend either
the "XFD" package or "DLD" .. Both are varients from the same author, both
allow easy transparent decompression of the many different compressed formats.
Once your sure that the program(s) you wish to patch are unpacked you can
use the program in full AUTOMATIC BATCH mode...
Simply Enter its name from any Shell or CLI window;
1> PatchFor020 <Hit Return>
You will then be prompted with a file requester with multi-selection
capabilities... simply select an entire directory , e.g. the "libs:" dir
then click on "ALL" on the requester to select all the files within it..
You will be prompted with a further file-requester.. now you can select the
DESTINATION.. the destination is where all the patched versions of the programs
will be placed... You can select <source> and <dest> as the same but I`d
strongly recommend to make backups of the files you are about to patch!
Also if you select NO DESTINATION and click on cancel the patched files
will be saved with an '.020' filename extension...
NB: Also take note that if a file cannot be patched it will be skipped, and
no saving of that particular file will take place...
Sorry about the sparse documents, but hey..its pretty simple to use.. -):
Scope for Future
----------------------------------
The more maths varients I come across the more I`ll add, also mentioned
elsewhere in this document I *may* add some application specific speed up
patches. Currently this program only patches 'maths' routines in the future
I`m considering replacement of other speed critical functions such as
standard compiler 'searching' routines, and so on.. this could benefit word
processors and text editors, etc...
SORRY that the source is so rushed and badly written.. No.. I didn`t
bother using PC-Relative addressing off a base register like a4 or a5!
(slapped rist`s eh P0T-NOODLE? ) and I *should* have used some sort of
linked list of structures for easy adding of extra checks.. but hey.. this
doc took longer to write than the program.. look out for the next version
for a better source.. it will be FAR better... just haven`t had the time
yet...
-------------------------------------------------------------------------------
Disclaimer Notice
---------------------------
No warrenties express or implied, use this program entirely
at your OWN risk.. If you trash one of your beloved programs
don`t come crying back to EX4.. Don`t say we didn`t warn you
to keep backups!!!!
Thanks to
------------------------
Arthur Hagen, author of "CopyMemQuicker".. the routine is used in the
program for copying the patches,
Nico Fraçias, author of the useful "Reqtools.library"..
Author of "PatchMatch020" for inspiration,
(don`t know his name because it wasn`t specified)
Handshakes to
----------------------------
THIS IS A RELEASE FOR ALL THE NON BELIEVERS OUT THERE... EX4 IS
REALITY! WE NEVER DIE!!!
Quick Personal golden handshakes & remarks from 2-Cool go out
to the following kewl scene dudes..;
The Art Hey.. What does it feel like to be the only other person
to know all the undisclosed hardware registers secrets ..
feel the buzz ? keep up the game coding marathon man! soon
we`ll be rich... -): v.soon!!!! )
Beldin Welcome to EX4 Mate! <-- Newest EX4 Member! Hope you
enjoy using your new found knowledge!! hehe )
Trixter lets get that demo finished!.. eh, what demo?! heh)
Aquafresh Thanks for sending me those music modules.. love
the reconstruction of `WarHawk' from the C64! very kewl
I`ll mail you soon. btw-) got anymore for us to listen
to? Hope your pinball *dreams* (excuse the pun!) get
fulfilled and you get back some decent $$$ back from the
thomas-pinball music for that game...
Kid-Curry How`s Pet-Sematary going these days?? Hope its `Buzzin'!)
Json Hi m8! still hanging in there.. Hows Static Chaos!...
Thanx for the greets m8!!
Sigma Seven Are you still working on S-Express these days?? Give me
a call some time soon huh!)
The Assassin Love that level one module for "ATROPHY".. keep em
flowing!.. soon` we`ll be onto level 2 ... )
Zadd Hey Darren you must come and visit me very soon !!!)
Data Data.. hows the work on the Saturn & Sony Playstation
working out?? managed to get your game engine sorted
out yet?... chat with you v.soon man!
Cath! Probably jetting off somewhere again!! ah! I don`t
know.. every time I call you your somewhere else...
Everytime you Call me you end up being some else too.
hehe :) I don`t know.. first USA, then JAPAN, etc. etc
Hey give me a call Charley.. You`ll have to come and
visit again v.soon.. Perhaps maybe we`ll go the Digital
Party together... What games you working on now then??
P0T-Noodle Hey.. hope your exams went fine mate.. Sorry if you`ve
been e-mailing me at Uni.. I`ve not read my E-Mail for
quite some time now.. been too busy coding to go into
Uni to read my e-mail.. after all it is Holidays.. and
yippe.. I passed all my exams... PHEW! hehe anyway GOOD
LUCK.. give me a ring soon so we can chat about that
coding project ..
Picard Is USS-Enterprise still online?? how ya doing these
days m8!! Hope all is well in outer space!! hehe
Scooter Steve! How ya doing these days.. converted to the PC yet!
hehe!)
Hybrid Digital Candy BBS is the coolest man! keep up the good
work and hopefully I`ll see you at the Digital Party 95!
Happy to use your Great BBS as the OFFICIAL RELEASE
site for the cool (and many more to come..) releases
for EX4!!! Nice... )
Skylark Hows ya doing man! is Skull offline these days?? hows
everything.. jezzus.. it`s been a long time since we
had a kewl chat.. miss`em. hope all is well for you! l8rs!
Say quick hi`s to the Biker for me too...
Galahad How`s Speris Legacy coming on?? getting behind scedule ?
hehe.. bet those game testers are getting on your nerves
now the pressures on huh!! hehe.. hi to Cyde too... !!)
I`ll send that video as soon as we finish level 1...
Reflex&Renegade Shit! I lost your phone number AGAIN! hehe trust me..
give me a ring and tell me again man!!
Sasha Hows it going? Still think your name sound like you
should be a Musician!! heh.. reminds me of a DJ` with
the same name!! hehe
Axeman Hey I`ve missed the 'kewl chats' since you went to
University.. just becase your in London gives you no
excuse for not occasionally e-mailing me or phoning..
I`ll give you a call soon.. just that ringing your mobile
costs me a small fortune.. get a real phone .heheh
N.O.M.A.D Yep.. the original.. hehe great scott.. the name still
lives on.. hehe just givin ya a big head man! -): how
you going these days?? Seen "Bub" (aka the old Bub (steve)
Bubble Bobble) recently in the Pub? heheh are you going to
the Digital Party? If so chat 2 you there!!!)
Super-Grover Whats happening with Alpha-flight these days?? Haven`t
heard anything from you lot for ages... Hows the BBS ?
Still into Rave ? I say I`d still swap any DJ in the Uk
for your Awesome Florida beaches!! hehe
Copyright Notice
----------------------------------
Designed & Written By 2-Cool/EX4 entirely in
Assembly Language.
Copyright EX4 (c) 1995. All Rights Are Reserved.
The program itself may be freely distributed. However the program
and its source-code & documentation remain fully copyright to EX4 and
its respective author(s). Permission is granted to put this on *NON*
profit making CD`s only! This program is NOT ALLOWED on *ANY* pay per
minute (0898 style) commercial Bulletin Boards systems or equivelents.
YOU MUST NOT CHARGE ANY MONEY FOR TRANSFER, LOAN, HIRE OR USE OF THIS
PROGRAM TO OTHER PARTIES, PEOPLE OR ORGANISATIONS. THE PROGRAM MUST BE
DISTRIBUTED WITH THIS DOCUMENT AND ITS SOURCE-CODE. THE PROGRAM SOURCE
MUST NOT BE MODIFIED, PATCHED OR ALTERED IN ANY WAY THEN RE-DISTRIBUTED
______________________________________________________________________________